﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <class name="OrmSmackdown.NHibernate.Portal, OrmSmackdown" table="Portals">
    <id name="PortalId" type="Int32">
      <generator class="identity" />
    </id>
    <property name="PortalName" type="String"></property>

    <many-to-one name="AdminUser" column="AdminUserId" foreign-key="PersonId" fetch="join" not-null="false" />
    <bag name="PortalUsers" table="PortalPeopleXref">
      <key column="PortalId" />
      <many-to-many class="OrmSmackdown.NHibernate.User, Ormsmackdown" column="PersonId" />
    </bag>
  </class>
</hibernate-mapping>
